{template 'common/header'}
{php $settings = get_settings()}
<style type="text/css">
    .panel-body > ul{list-style:none;margin: 0px;padding: 0px}
    .panel-body > ul li{display: inline-block}
</style>
<div class="main">
    <ul class="nav nav-tabs">
    <li><a href="{php echo url('member/member');}">财务中心</a></li>
    <li><a href="{php echo url('member/buypackage');}">套餐购买</a></li>
    <li><a href="{php echo url('member/buysms');}">短信购买</a></li>
	{if $_W['isfounder']}
    <li><a href="{php echo url('member/record');}">会员消费</a></li>
	<li><a href="{php echo url('member/configs');}">服务配置</a></li>
    <li class="active"><a href="{php echo url('member/test');}">测试服务</a></li>
    {/if}
</ul>
    <div>
        <aside>
            <section>
                <div class="panel panel-info">
                    <div class="panel-heading">测试中心</div>
                    <div class="panel-body">
                        <button name="test_auto" class="btn btn-info">测试自动续费、提醒</button>
                    </div>
                </div>
            </section>
        </aside>
    </div>
</div>
<script type="text/javascript">
    require(['bootstrap'],function($){
        $("button[name=test_auto]").on("click", function(){
            $.ajax({
                'url':"{php echo url('member/test')}",
                'data':{op:'auto'},
                'type':'POST',
                'async':'true',
                'dataType':'json',
                'success':function(data){
                    console.debug(data);
                    alert(data.message);
                }
            });
        })
    });
</script>
{template 'common/footer'}